<?php
namespace common\validators;

use yii\base\ActionFilter;

/**
 * Class PartnerAccessFilter
 * @package common\validators
 * 业务方访问接口授权校验过滤器
 */
class PartnerAccessFilter extends ActionFilter
{
    public $denyCallback;

    public function beforeAction($action)
    {
        $action     = $action->id;
        // 内部接口判定，服务器IP白名单校验等
//        if (false) {
//            call_user_func($this->denyCallback, '校验失败');
//            return false;
//        }
        return true;
    }
}